package com.zking.ssm.DYM.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zking.ssm.DYM.mapper.HotelRoomMapper;
import com.zking.ssm.DYM.model.HotelRoom;
import com.zking.ssm.DYM.service.IHotelRoomService;
import com.zking.ssm.util.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description
 * @Author XXXXX
 * @Date 2021/01/19 18:48
 */
@Service
public class HotelRoomServiceImpl implements IHotelRoomService {
    @Autowired
    private HotelRoomMapper hotelRoomMapper;

    public HotelRoomServiceImpl() {
    }

    public HotelRoomMapper getHotelRoomMapper() {
        return hotelRoomMapper;
    }

    public void setHotelRoomMapper(HotelRoomMapper hotelRoomMapper) {
        this.hotelRoomMapper = hotelRoomMapper;
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return hotelRoomMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(HotelRoom record) {
        return hotelRoomMapper.insert(record);
    }

    @Override
    public HotelRoom selectByPrimaryKey(Integer id) {
        return hotelRoomMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKey(HotelRoom record) {
        return hotelRoomMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<HotelRoom> list(HotelRoom record, PageBean pageBean) {
        List<HotelRoom> hotelRoomList = hotelRoomMapper.list(record);
        return hotelRoomList;
    }
}
